import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:hockey/extensions/jzx_json_extension.dart';
part 'jzx_avatar_data.freezed.dart';
part 'jzx_avatar_data.g.dart';

@freezed
class JzxAvatarData with _$JzxAvatarData {
  const factory JzxAvatarData({
    @JzxJsonAlwaysString() @Default('') String mediaId,
    @JzxJsonAlwaysString() @Default('') String userId,
    @JzxJsonAlwaysString() @Default('') String mediaType,
    @JzxJsonAlwaysString() @Default('') String mediaPath,
    @JzxJsonAlwaysString() @Default('') String thumbUrl,
    @JzxJsonAlwaysString() @Default('') String middleThumbUrl,
    /// avatar
    @JzxJsonAlwaysString() @Default('') String mediaUrl,
    int? sort,
    int? status,
  }) = _JzxAvatarData;

  factory JzxAvatarData.fromJson(Map<String, Object?> json) =>
      _$JzxAvatarDataFromJson(json);
}
